home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 May / EnigmA AMIGA RUN 18 (1997)(G.R. Edizioni)(IT)[!][issue 1997-05][EAR-CD II].iso / earcd / biz / swood / fw_font.lha / FW_Font / FontLook-Auto.fwrexx.long < prev    next >
Text File  |  1996-02-12  |  7KB  |  299 lines

  1. /* Hiermit erhält man eine Übersicht über seine gesamten Zeichensätze*/
  2. /* © Heiko Schröder / 20.01.97 / Mail: s93324@fh-telekom-leipzig.de */
  3. R='0A'X
  4.  
  5. Address='FinalW'
  6. Options results
  7.  
  8. STATUS PORTNAME
  9. FW = result
  10. address = FW
  11.  
  12. SIGNAL ON BREAK_C
  13.  
  14. 'ShowMessage 2 0 "FontLook - Auto V2.70" "für Font-Verzeichnisse..." "(©) Heiko Schröder - 20.01.97" ":-)" "Ok" "(-:"'
  15. 'ShowMessage 1 1 "A C H T U N G !" "Das Makro benötigt ein leeres Dokument." "Ihr jetziges Dokument wird gelöscht!" "Ja" "Abbruch" ""'
  16. if result=2 then call BREAK_C
  17. Cleardoc Force
  18.  
  19. 'ShowMessage 2 0 "Codes oder Layout" "" "" "Codes" "Layout" ""'
  20. cl=result
  21.  
  22. 'ShowMessage 2 0 "Wie soll die" "Bilschirmausgabe erfolgen?" "" "Normal" "Speed" ""'
  23. ba=result
  24.  
  25. /*----- REXXREQTOOLS -----*/
  26.  
  27. Temp="ram:fonts"
  28. if ~show('L',"rexxreqtools.library") then do
  29.    if ~addlib('rexxreqtools.library',0,-30,0) then do
  30.       'ShowMessage 1 1 "Fehler...." "Benötige RexxReqTools.library" " A B B R U C H ! !" "Okay" "" ""'
  31.       exit
  32.    end
  33. end
  34.  
  35. dir=rtfilerequest("FWFonts/SWOLFonts/",,"Verzeichnis auswählen...","»·Start·«","rt_pubscrname=FinalWriterPubScreen rtfi_flags = freqf_nofiles")
  36. if dir="" then do
  37.    'ShowMessage 1 1 "Kein Verzeichnis ausgewählt!" "   A B B R U C H ! !" "" "Okay" "" ""'
  38.    exit
  39. end
  40. dir=d2c(34)||dir||d2c(34)
  41. address command 'list ' dir || ' to=' Temp || ' files lformat "%s%s"'
  42.  
  43. If OPEN('file',Temp,"R") then
  44. If Seek("file",0,"E")=0 then do
  45.    'ShowMessage 1 1 "Verzeichnis ist leer" " A B B R U C H ! !" "" "Okay" "" ""'
  46.    address "REXX"
  47.    close("file")
  48.    EXIT
  49. end
  50.  
  51. address "REXX"
  52. close("file")
  53. address command 'sort ' Temp Temp
  54. OPEN('file',Temp, "R")
  55.  
  56. address(FW)
  57. 'ShowMessage 1 0 "Benötigen Sie Locher-Marken?" "" "" "Ja" "Nein" ""'
  58. lm=result
  59. 'ShowMessage 1 0 "Wie geht es weiter?" "" "" "Speichern" "Speichern & Drucken" "Drucken"'
  60. wgw=result
  61.  
  62.  
  63. /*----- Schleife bis alle Fonts ausgegeben worden sind -----*/
  64.  
  65. DO WHILE 1
  66.    FontName=ReadLn('file')
  67.     IF EOF('file') THEN do
  68.       address "REXX"
  69.       close('file')
  70.       call Ende
  71.    End
  72.  
  73.    /*FensterMinimierung*/
  74.    IF ba=2 THEN DO
  75.       status WINDOW
  76.       parse VAR result links oben width height minwidth minheight maxwidth maxheight
  77.       sizewindow minwidth minheight
  78.    End
  79.  
  80.    GetDocItemPrefs Decimal
  81.    Punkt=Result
  82.    If Punkt="Comma" then DocItemPrefs Decimal Period
  83.  
  84.    TextTool
  85.    Font FontName
  86.    a=RC
  87.    If a=0 then do                  /* Kann FW den Font verarbeiten?*/
  88.  
  89.       Type d2c(32)
  90.       BackSpace
  91.       status FontPath
  92.       FullFontName=result
  93.       pos=LASTPOS('/', FullFontName)
  94.       IF (pos~=0) THEN
  95.          FontName=RIGHT(FullFontName, LENGTH(FullFontName)-pos)
  96.       ELSE DO
  97.          pos=LASTPOS(':', FullFontName)
  98.          IF (pos~=0) THEN
  99.             FontName=Right(FullFontName, LENGTH(FullFontName)-pos)
  100.          ELSE
  101.          EXIT
  102.       END
  103.  
  104.       IF ba=2 THEN View 20
  105.  
  106.       Pagesetup Pagetype A4 Orient Tall Pages RightOnly Top 0 Bottom 2.54 Left 0 Right 0
  107.       SectionSetup Top 2.54 Bottom 2.54 Inside 2 Outside 1
  108.  
  109.       GraphicTool
  110.       LinePrefs LineWt .5
  111.       DrawLine 1 2 3.5 20 3.5
  112.       DrawLine 1 2 26 20 26
  113.  
  114.       If lm=1 then DrawLine 1 .5 14.85 1 14.85
  115.  
  116.       TextTool
  117.       If cl=1 then do
  118.  
  119.          Do i=0 to 13
  120.             SetTab i*1.3+0.8 Right
  121.          End
  122.  
  123.          NameFont="FWDocs/Codes-" || FontName
  124.          Justify Center
  125.          Font Softsans
  126.          FontSize 18
  127.          Type FontName||R||R
  128.  
  129.          a=0
  130.  
  131.          DO w=1 to 15
  132.  
  133.             Font Softsans
  134.             FontSize 8
  135.             DO x=a+33 to a+46
  136.                 Type d2c(9) || x || d2c(32) || d2c(x)
  137.             END
  138.  
  139.             Type R
  140.  
  141.             Font FontName
  142.             FontSize 24
  143.             DO x=a+33 to a+46
  144.                 Type d2c(9)
  145.                Type d2c(x)
  146.             END
  147.  
  148.             Type R
  149.  
  150.             a=a+14
  151.  
  152.          END
  153.  
  154.          Font Softsans
  155.          FontSize 8
  156.          DO x=a+33 to a+45
  157.              Type d2c(9) || x || d2c(32) || d2c(x)
  158.          END
  159.  
  160.          Type d2c(9)||R
  161.  
  162.          Font FontName
  163.          FontSize 24
  164.          DO x=a+33 to a+45
  165.              Type d2c(9)
  166.             Type d2c(x)
  167.          END
  168.          Type d2c(9)||R
  169.          FontSize 12
  170.          Type d2c(9)||R
  171.          Font Softsans
  172.  
  173.          FontSize 8
  174.          Justify Right
  175.          Type Date(E)" - "FullFontName
  176.  
  177.       END
  178.  
  179.       If cl=2 then do
  180.  
  181.          Justify Center
  182.          NameFont="FWDocs/Layout-" || FontName
  183.          Font Softsans
  184.          FontSize 18
  185.          Type FontName||R
  186.  
  187.          Justify Left
  188.          Font FontName
  189.          FontSize 8
  190.          Type R||"This is 8-point type - not easy to read!"||R
  191.  
  192.          FontSize 9
  193.          Type "9-Point type is about the smallest readable size."||R
  194.  
  195.          FontSize 10
  196.          Type "With 10-point type, we have a normal text size."||R
  197.  
  198.          FontSize 12
  199.          Type "With some Fonts, 12-point type is easier to read."||R
  200.  
  201.          FontSize 14
  202.          Type "14-point type is good for subheadings."||R
  203.  
  204.          FontSize 16
  205.          Type "For larger subheadings, try 16-point type."||R
  206.  
  207.          FontSize 18
  208.          Type "18-point type makes nice small headlines."||R
  209.  
  210.          FontSize 24
  211.          Type "24-point type is for medium headlines."||R
  212.  
  213.          FontSize 36
  214.          Type "36-point is for larger ones."||R
  215.  
  216.          FontSize 48
  217.          Type "48-point almost shouts!"||R||R
  218.  
  219.          FontSize 12
  220.          Font SoftSans
  221.          Type "NORMAL"||R
  222.  
  223.          FontSize 10
  224.          Font FontName
  225.          Type "ABCDEFGHIJKLMNOPQRSTUVWXYZ"||R
  226.          Type "abcdefghijklmnopqrstuvwxyz 1234567890 !@#$%^&*()-+=[]{}/:;,.?"||R
  227.          Type "The quick brown fox jumps over the lazy dog. ÄÖÜäöüß"||R||R||R
  228.  
  229.          Font SoftSans
  230.          Type "ERWEITERTER SCHRIFTCODE"||R
  231.  
  232.          FontSize 10
  233.          Font FontName
  234.          j=0
  235.          Do i=1 to 4
  236.             Do k=128+j to 159+j
  237.                Type d2c(k)
  238.             End
  239.             Type R
  240.             j=j+32
  241.          End
  242.          Status BodyTextHeight
  243.          th=result
  244.          FG=26.24-2.113-th
  245.          FG=Trunc(FG*8/0.34)
  246.          FontSize FG
  247.          Type d2c(9)
  248.          Font SoftSans
  249.          FontSize 8
  250.          Type R
  251.          Justify Right
  252.          Type Date(E)" - "FullFontName
  253.       End
  254.  
  255.       call WH
  256.  
  257.    /* Nur Speichern */
  258.       If wgw~=3 then 
  259.          Save NameFont
  260.  
  261.       /* Speichern+Drucken */
  262.       If wgw=2 then 
  263.          Print
  264.  
  265.       /* Nur Drucken */
  266.       If wgw=3 then
  267.          Print
  268.  
  269.       Cleardoc force
  270.    END
  271.    else do
  272.       call WH
  273.       'ShowMessage 1 1 "FW kann diesen Font nicht anzeigen..." "Es ist kein FW typischer Font..." "" "Okay" "" ""'
  274.    end
  275. END
  276.  
  277. Ende:
  278.    Address(FW)
  279.    If cl=1 then 'ShowMessage 2 1 "Die Dokumente sind im FWDocs-Drawer" "zu finden. Erkennbar am «Codes-.....«" "Vielen Dank für die Benutzung." "@-`-" "Bitte" ":-))"'
  280.    If cl=2 then 'ShowMessage 2 1 "Die Dokumente sind im FWDocs-Drawer" "zu finden. Erkennbar am «Layout-.....«" "Vielen Dank für die Benutzung." "@-`-" "Bitte" ":-))"'
  281.    Address command "delete ram:fonts QUIET"
  282.    EXIT
  283.  
  284. BREAK_C:
  285.    'ShowMessage 1 1 "Makro-Abbruch..." "" "" "Ich weiß..." "" ""'
  286.    call WH
  287.    address "REXX"
  288.    CLOSE("file")
  289.    Address command "delete ram:fonts QUIET"
  290.    EXIT
  291.  
  292. WH:
  293.    If ba=2 then do
  294.       View
  295.       sizewindow width height
  296.    End
  297.    If Punkt="Comma" then DocItemPrefs DECIMAL Comma
  298. Return
  299.